/**
 * 
 */
package exp.social.graph.dataaccess;

/**
 * @author Volodya Gavrysh
 *
 */
public class DataProviderResult<T> {
	private T result;
	private boolean success;
	private Exception error;
	
	public DataProviderResult(T result){
		this(result, true, null);
	}
	public DataProviderResult(T result, boolean isSuccess, Exception error){
		this.setResult(result);
		this.setSuccess(isSuccess);
		this.setError(error);
	}
	public T getResult() {
		return result;
	}
	private void setResult(T result) {
		this.result = result;
	}
	public boolean isSuccess() {
		return success;
	}
	private void setSuccess(boolean success) {
		this.success = success;
	}
	public Exception getError() {
		return error;
	}
	private void setError(Exception error) {
		this.error = error;
	}
}
